home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / m68k / 512 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.6 KB

  1. Path: isar.de!news
  2. From: imd@m.isar.de (Thomas Doerfler)
  3. Newsgroups: comp.sys.m68k
  4. Subject: Re: 332 Interrupt programming
  5. Date: Mon, 01 Apr 1996 09:02:41 GMT
  6. Organization: IMD
  7. Message-ID: <4jo2ct$7d8@nixe.isar.net>
  8. References: <4jj91i$15i8@pulp.ucs.ualberta.ca>
  9. NNTP-Posting-Host: imd.m.isar.de
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12. wbortz@gpu.srv.ualberta.ca (Wade Bortz) wrote:
  13.  
  14. >    I've been struggling with this for a month or so now - can anyone 
  15. >recomend some resources which would explain interrupt programming on the 
  16. >332 in C?  Motorola has not been of much help, neither has SDSI, whose C 
  17. >compiler I am using.  
  18. >    I want to run an interrupt function once every second.  I'm using 
  19. >the #pragma interrupt compiler directive for the function, and have set 
  20. >PICR and PITR, and loaded the address of my interrupt function into the 
  21. >proper vector in the exception table.  What am I missing here?  Any help 
  22. >would be greatly appreciated.
  23.  
  24. Well, there shouldn't be missing much...
  25. The steps you did not mention were
  26. - lowering the interrupt mask in the CPU's status register (after
  27. reset all interrupts are masked, write 0x2000 to the SR to allow all
  28. interrupts)
  29. - you should also check, that there is a value greater than zero in
  30. the IARB field of the SIM MCR. Recommended value for this field: 0x0f.
  31.  
  32. What does your system do? does it crash? or simply do nothing?
  33.  
  34.         Bye, Thomas.
  35.  
  36. --------------------------------------------
  37. IMD Ingenieurbuero fuer Microcomputertechnik
  38. Thomas Doerfler           Elilandstrasse 12
  39. D-81547 Muenchen          Germany
  40. email:    td@imd.m.isar.de
  41.  
  42.